-
-
Aesthetics and programming theories.
-
Casing
-
camelCase :
-
getCookie
-
-
snake_case :
-
get_cookie
-
-
PascalCase :
-
GetCookie
-
Anonymous Functions vs Lambda Functions vs Closures
-
Lambda :
-
They are Anonymous Functions, even smaller, in one line.
-
-
Closures :
-
An Anonymous Function, but aware of its surroundings.
-
Operators
-
Unary :
-
Operators operate on a single target (such as
-a). Unary prefix operators appear immediately before their target (such as!b), and unary postfix operators appear immediately after their target (such asc!).
-
-
Binary :
-
Operators operate on two targets (such as
2 + 3) and are infix because they appear between their two targets.
-
-
Ternary :
-
Operators operate on three targets. Like C, Swift has only one ternary operator, the ternary conditional operator (
a ? b : c).
-
-
The values that operators affect are operands . In the expression
1 + 2, the+symbol is an infix operator and its two operands are the values1and2.
Compilation / Interpreter
Reflection
-
It is the ability of a program to inspect and manipulate its own structure at runtime.
-
This includes:
-
Listing types, functions, fields, attributes.
-
Getting function argument types.
-
Dynamically creating instances of types.
-
Invoking functions by their names.
-
-
Function Introspection :
-
A subtype of reflection. Refers specifically to the ability to:
-
Get the function name.
-
View its parameters and types.
-
Know its return type.
-
Inspect attributes.
-
View its source code.
-
-